/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package JFreeChartExtensions.utils;

import java.awt.Color;

/**
 *
 * @author Nobody
 */
public class ColorEnumerator {

    public static final Color[] availableColors;
    private static int index = -1;

    static {
        availableColors = new Color[7];
        availableColors[0] = Color.RED;
        availableColors[1] = Color.BLUE;
        availableColors[2] = Color.BLACK;
        availableColors[3] = Color.GREEN;
        availableColors[4] = Color.GRAY;
        availableColors[5] = Color.ORANGE;
        availableColors[6] = Color.MAGENTA;
    }

    public static Color getNextColor() {
        index = ++index % availableColors.length;
        return availableColors[index];
    }

    public static void main(String[] args) {
        Color a;
        while (true) {
            a = ColorEnumerator.getNextColor();
        }
    }
}
